package com.ssm.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;
import java.io.Serializable;
import java.util.List;

/**
 * (SysUser)实体类
 *
 * @author makejava
 * @since 2021-06-01 10:41:33
 */
public class SysUser implements Serializable {
    private static final long serialVersionUID = -81987875120260104L;
    /**
     * 用户id
     */
    private Integer id;
    /**
     * 用户账户名
     */
    private String userCode;
    /**
     * 用户密码
     */
    private String userPwd;
    /**
     * 用户名
     */
    private String userName;
    /**
     * 盐值
     */
    private Integer salt;

    /**

     * 查询到权限信息
     */
    private List<SysPer> sysPers;

    private List<SysRole> sysRoles;



    /**
     * 用户创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")

    private Date createTime;
    /**
     * 用户信息修改时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")

    private Date updateTime;
    /**
     * 用户是否锁定。0：否/1：是
     */
    private Integer locked;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUserCode() {
        return userCode;
    }

    public void setUserCode(String userCode) {
        this.userCode = userCode;
    }

    public String getUserPwd() {
        return userPwd;
    }

    public void setUserPwd(String userPwd) {
        this.userPwd = userPwd;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Integer getSalt() {
        return salt;
    }

    public void setSalt(Integer salt) {
        this.salt = salt;
    }

    public List<SysPer> getSysPers() {
        return sysPers;
    }

    public void setSysPers(List<SysPer> sysPers) {
        this.sysPers = sysPers;
    }

    public List<SysRole> getSysRoles() {
        return sysRoles;
    }

    public void setSysRoles(List<SysRole> sysRoles) {
        this.sysRoles = sysRoles;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getLocked() {
        return locked;
    }

    public void setLocked(Integer locked) {
        this.locked = locked;
    }


    @Override
    public String toString() {
        return "SysUser{" +
                "id=" + id +
                ", userCode='" + userCode + '\'' +
                ", userPwd='" + userPwd + '\'' +
                ", userName='" + userName + '\'' +
                ", salt=" + salt +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", locked=" + locked +
                '}';
    }
}
